<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 300px;
            height: 300px;
            background-color: blueviolet;
            margin: auto;
            /* 标准写法 */
            transition: all 1s;
            /* 火狐*/
            -moz-transition: all 1s;
            -webkit-transition: all 1s;
            margin-bottom: 20px;
        }
        
        .box1 {
            background-image: linear-gradient(45deg, red, yellow, blue, green);
        }
        
        .box2 {
            /* 0-10px 红色纯色 10px-50px 红色到蓝色的过渡 50px之后是蓝色纯色*/
            background-image: repeating-linear-gradient(red 10px, blue 50px);
            font-size: 50px;
            line-height: 50px;
        }
        
        .box3 {
            background-image: radial-gradient(center, red, yellow);
            background-image: -webkit-radial-gradient(left top, red, yellow);
        }
        
        .box4 {
            background-image: repeating-radial-gradient(blue, red 20px);
        }
        
        div:hover {
            /* background-color: red; */
        }
    </style>
</head>

<body>
    <div class="box box1"></div>
    <div class="box box2">
        Lorem ipsum dolor sit amet consectetur
    </div>
    <div class="box box3"></div>
    <div class="box box4"></div>
</body>

</html>